1. Filed of the Invention
The present invention relates to a computer program generating method, and more particularly to a method of generating, from a series of examples in which a user had operated an application program, an operation macroprogram which makes it possible to perform a similar operation again.
2. Description of the Related Art
As computers have spread widely in offices and so forth, even a user who is not an expert in programming, is requested to handle a completed application program. In using the application program, there is the case where the same operation must be repeated many times each time the program is used. If such a series of operations can be utilized as a program, it is convenient.
As a method of generating a program for automating the operation of an application program there has widely been used a method in which a so-called "program by example (PBE)" is generated from operations presently shown as examples. In this method, a series of examples in which a user had operated an application program are stored as a program so that they can be used again. To call this program suffices to perform the series of operations again. According to this method, a user does not need to have the knowledge of a programming language and has almost no need to input a program by use of a keyboard. In the following, a program generated from such operations shown as examples will be called an "operation macro" and a program for generating the operation macro will be called an "operation macro" generation program.
For example, "Microsoft Excel Users Guide" which is a table calculation application program developed by Microsoft Corp. in U.S.A., incorporates an operation macro generation program therein. Namely, as describe, on pages 450 to 458 of the manual "Microsoft Excel Users Guide" published in 1989, when a user successively indicates a plurality of operations for some cell data, an operation macro having the indicated operation train stored therein is automatically generated and it is possible from the next time on to indicate the same operation train for cell data with another value by calling the generated operation macro In "Excel", a basic system program for processing a signal from a hardware sends a keyboard operation or the like by a user to the Excel, and a processing to be performed for the operation is performed while it is stored as a command of the operation macro. Such each command of the operation macro incorporated in the application program is executed in accordance with the completion of execution of the preceding command.
Another example of an application program having an operation macro generation program is CCT-98-III developed Simple Language Manual developed by Gijijutsu Hyoron-sha. In substance, this is a communication program for allowing a user to use a computer in hands as a terminal of another computer. As described on pages 22 to 35 of CCT-98-III Simple Language Manual (published in 1991), which is the manual of that program, an operation macro is generated in such a manner that not only a series of user operations but also a response from a sender are stored together to be programed. For example, in the case where a user produces an operation macro for making a connection from a computer in hands to a remote computer, the mere sending of a user's input to the remote computer provides a problem. Since a communication between computers is made in accordance with a predetermined procedure, a receiver computer cannot receive the sent input from the sender computer even if it is sent from the sender computer if the receiver computer is not ready for reception. In the CCT-98-III, therefore, a step of confirming the completion of a remote computer's preparation for reception by a message output from the sender is incorporated in an operation macro to be generated, thereby succeeding in sending the input with a good timing always. For example, an operation macro generated in the case where during operations shown as examples a user ID is inputted in response to a message "Enter User ID" includes a step of sending the user ID inputted after waiting for the preceding message being outputted.
A program described by U.S. Ser. No. 07/589,405 filed Sep. 18, 1990 of the present applicants can also be called an operation macro generation program, the disclosure of which is incorporated herein by reference, and is not intended to be prior art. According to this program, a user produces an operation macro by use of different operation examples under various conditions, and the execution of the generated operation macro for another data is made with a control by which an operation corresponding to a condition on that occasion is performed.
An example of an operation macro generation program provided independent of an application program includes the product "Quickeys 2" of CE Software Inc. in U.S.A. This program is suitable for generating an operation macro from a user operation for an application program which has no operation macro generation program incorporated therein. Further, as described on 2-1 to 2-14 sections of the manual "Quickeys 2" (not pagenated) of the program, it is possible to generate an operation macro from a user operation over a plurality of applications as well as a user operation for one application program. The "Quickeys 2" can operate under the control of a window server to generate an operation macro for another application program which operates under window environments. In the "Quickeys 2" the storage is made at a point of time when the window server receives a keyboard operation by a user.
In the "Quickeys 2", an operation macro can be generated from a user operation performed for an application program which operates under window environments. However, under such window environments, a request for the generation or erasion of a window may frequently be made from the application as a response for the performance of a user operation. A macrocommand generated from a user operation inputted after the generation or erasion of the window on the basis of the request must be executed after the window generation or erasion even when the operation macro is executed. However, a time until the window is actually generated after the request for the window generation or erasion has been made, is not constant and differs depending upon the condition of a computer on that occasion. Accordingly, there results in that the macrocommand to be executed after the window generation or erasion is executed before the window generation or erasion.
In the "Quickeys 2", a time of wait for the execution of the next command can be designated by a user in the course of execution of a train of commands. In order that this advantage is used to solve the above-mentioned problem so that the macrocommand is executed after the completion of the window generation or erasion, it is necessary to designate the maximum designable wait time. However, in the case where such a time is designated, a long time may be consumed when the window generation or erasion is made at an early stage.
Further, there may be the case where a window, for which a request is made from an application program in response to a user operation, changes depending upon the operation environment of the application program at that time. Thus, there may be the case where a window different from a window generated upon generation of an operation macro is generated after the execution of that operation macro. Accordingly, it is not possible to obtain a normal result by merely executing the above-mentioned macrocommand after the window generation or erasion.